From 7baa211415c802a88daa8e2f1c6c948af157d06f Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Sun, 17 Jul 2005 19:48:03 +0000 Subject: [PATCH] purge file cache on save --- includes/Article.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/Article.php b/includes/Article.php index e3ac744bde..9a26a2e00c 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1127,7 +1127,7 @@ class Article { function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) { global $wgOut, $wgUser; global $wgDBtransactions, $wgMwRedir; - global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList; + global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList, $wgUseFileCache; $fname = 'Article::updateArticle'; $good = true; @@ -1232,6 +1232,12 @@ class Article { array_push( $wgPostCommitUpdateList, $u ); } + # File cache + if ( $wgUseFileCache ) { + $cm = new CacheManager($this->mTitle); + @unlink($cm->fileCacheName()); + } + $this->showArticle( $text, wfMsg( 'updated' ), $sectionanchor, $isminor, $now, $summary, $lastRevision ); } return $good; -- 2.20.1